#include "ConstantInt.h"

ConstantInt::ConstantInt(NodeContainer* parent,
	    unsigned size,
	    uint64_t numVal,
	    bool isSigned) : Node(parent),
			     size(size), 
			     numVal(numVal),
			     isSigned(isSigned) {
  addSource();
}

void ConstantInt::process(llvm::IRBuilder<> *builder) {
  sources[0]->setValue(llvm::ConstantInt::get(llvm::getGlobalContext(), llvm::APInt(size, numVal, isSigned)));
}


